/************************************************
 * Author       :   XXY
 * Blog         :   https://www.cnblogs.com/jzyl
 * Gitee        :   https://gitee.com/xiaobaichong
 * Email        :   1047185209@QQ.com
 * FileName     :   HelloWorld.cs
 * CreateData   :   2024/12/8 14:30:34
 * UnityVersion :   2021.3.30f1c1
 * Description  :   Hello World
************************************************/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;

public class HelloWorld : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {

    }
    // 一个异步方法，模拟一些耗时操作
    public async Task LongRunningOperation(Action<bool> complete)
    {
        await Task.Delay(2000); // 模拟延迟2秒
        print("完成");
        complete?.Invoke(true);
    }
}
